<!--
    (c) 2007, Stephane Alnet
    
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 3
    of the License, or (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-->

<!-- We may have a signalling group covering multiple spans: NFAS, SS7 -->
<!-- Conversely, for channel-associated, we need to make sure the timeslot group covers the whole span -->

<div <TMPL_VAR NAME="port_id">_fe_media="E1 T1">
    <fieldset>
        <legend>Timeslot Group <TMPL_VAR NAME="ts_name"></legend>

        <p>
            <label for="<TMPL_VAR NAME="ts_group">_signaling_type">Signaling Type</label>
            <select name="<TMPL_VAR NAME="ts_group">_signaling_type" id="<TMPL_VAR NAME="ts_group">_signaling_type" class="trigger">
                <!-- TDMV aka TDM/zaptel: Asterisk, Callweaver -->
                <option value="pri" <TMPL_VAR NAME="port_id">_fe_media="T1" is_default="true">T1 PRI (23 B channels)</option>
                <option value="pri" <TMPL_VAR NAME="port_id">_fe_media="E1" is_default="true">E1 PRI (30 B channels)</option>
                <!-- <option value="pri_bchan">PRI B-channel</option> -->
                <!-- <option value="pri_dchan">PRI D-channel</option> -->
                <option value="cas" <TMPL_VAR NAME="port_id">_fe_media="T1">T1 CAS</option>
                <option value="cas" <TMPL_VAR NAME="port_id">_fe_media="E1">E1/R2</option>
                <!-- TDM API aka AFT_TE1: Asterisk, Callweaver, Freeswitch, Yate, Sunrise, SMG -->
                <!-- <option value="TDM API"></option> -->
                <!-- <option value="XMTP2"></option> --><!-- ss7boxd -->
                <!-- Wanpipe data protocols -->
                <!-- <option value="FR">Frame Relay</option> -->
                <option value="hdlc">HDLC</option>
                <option value="chdlc">Cisco HDLC</option>
                <option value="ppp">PPP</option>
                <!-- <option value="X25">X.25 API</option> -->
                <!-- Linux kernel protocols -->
                <!-- <option value="MFR">MP Frame Relay</option>  -->
                <!-- <option value="MPPP">MP Prot</option>        -->
                <!-- <option value="ADSL">ADSL</option>           -->
                <!-- <option value="ATM">ATM</option>             -->
                <!-- API protocols -->
                <!-- <option value="SS7"></option> -->        
            </select>
        </p>

        <div <TMPL_VAR NAME="ts_group">_signaling_type="pri_bchan hdlc chdlc ppp">
            <p>
                <label for="<TMPL_VAR NAME="ts_group">_fractional">Fractional</label>
                <input type="checkbox"  name="<TMPL_VAR NAME="ts_group">_fractional" id="<TMPL_VAR NAME="ts_group">_fractional" value="true"  class="trigger" />
            </p>
            <div <TMPL_VAR NAME="ts_group">_fractional="true">
                <p>
                    <label for="<TMPL_VAR NAME="ts_group">_chan_start">First channel</label>
                    <input type="text" name="<TMPL_VAR NAME="ts_group">_chan_start" id="<TMPL_VAR NAME="ts_group">_chan_start"
                        <TMPL_VAR NAME="ts_group">_fractional="true"
                        dojoType="dijit.form.NumberTextBox"
                        constraints="{min:1,max:32,places:0}"
                        />
                </p>
                <p>
                    <label for="<TMPL_VAR NAME="ts_group">_chan_end">Last channel</label>
                    <input type="text" name="<TMPL_VAR NAME="ts_group">_chan_end" id="<TMPL_VAR NAME="ts_group">_chan_end"
                        <TMPL_VAR NAME="ts_group">_fractional="true"
                        dojoType="dijit.form.NumberTextBox"
                        constraints="{min:1,max:32,places:0}"
                        />
                </p>
            </div>
        </div>

        <TMPL_INCLUDE NAME="signaling_cas.html">
        <TMPL_INCLUDE NAME="signaling_pri.html">
        <TMPL_INCLUDE NAME="signaling_data.html">

    </fieldset>    
</div>
